/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ivanbiz.service;

import com.ivanbiz.model.Pengguna;
import java.util.Map;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.Sessions;
import org.zkoss.zk.ui.util.Initiator;

/**
 *
 * @author IW20149X
 */
public class AuthenticationInit implements Initiator {

    public void doInit(Page page, Map<String, Object> map) throws Exception {
        Pengguna pengguna = (Pengguna) Sessions.getCurrent().getAttribute("pengguna");
        if (pengguna == null) {
            Executions.sendRedirect("/");
            return;
        }
    }
}
